﻿using System;

namespace TetrisGame
{
    internal struct Position
    {
        public int x; // X坐标
        public int y; // Y坐标

        // 构造函数
        public Position(int x, int y)
        {
            this.x = x;
            this.y = y;
        }

        // 重载 != == 运算符
        public static bool operator !=(Position a, Position b)
        {
            return !(a == b);
        }
        public static bool operator ==(Position a, Position b)
        {
            return a.x == b.x && a.y == b.y;
        }
        // 重载 + 运算符
        public static Position operator +(Position a, Position b)
        {
            return new Position(a.x + b.x, a.y + b.y);
        }
    }
}
